package com.easy.module.generator.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.easy.module.generator.entity.GenTableField;
import com.easy.module.generator.mapper.GenTableFieldMapper;
import com.easy.module.generator.service.IGenTableFieldService;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 生成表字段Service业务层处理
 *
 * @author Yang Huijing (Email:1073602@qq.com)
 * @date 2024-11-08
 */
@RequiredArgsConstructor
@Service
public class GenTableFieldServiceImpl extends ServiceImpl<GenTableFieldMapper, GenTableField> implements IGenTableFieldService {

    @Override
    public List<GenTableField> listByTableId(Long tableId) {
        return list(lambdaQueryWrapper().eq(GenTableField::getTableId, tableId));
    }

    @Override
    public List<GenTableField> listByTableIds(List<Long> tableIds) {
        return list(lambdaQueryWrapper().in(GenTableField::getTableId, tableIds));
    }
}
